home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dark Star 2
/
Dark_Star_02_1995_-_de_Side_B.d64
/
bio warefare
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
6KB
|
212 lines
100 goto2000
110 ]re:]li 1:]sp 68:]pi 68:]kn 150,150
120 i=rnd(-rnd(0)):poke53272,21:poke53280,1:poke53281,9
140 t$=""
150 qp=197:qa=73
160 ig=160:vi=215:co=209:gi=170
170 goto1360
180 print"[147]";" how many islanders (<=100)?";:say"how many i landers."
185 gosub1720:np=val(z1$)
190 ifnp=0then180
200 ifnp>100thenprint"[145][145]";:goto180
210 print" how many infected at start?";:say"how many infeckted at the start."
215 gosub1720:ni=val(z1$)
220 ifni=0then210
230 ifni>npthenprint"[145][145]";:goto210
240 print" contagion time (days)?";:say"contaygen time in days."
245 gosub1720:ct=val(z1$)
250 ifct=0thenprint"[145][145]";:goto240
260 restore
270 print"[147][144]":poke53281,3:fori=1to18:readil,ir
280 forj=iltoir:pokej,ig:pokej+54272,9:next:next
290 print" [215]=uninfected [209]=contagious *=immune"
300 print"[144] contagion"
310 print" time "ct;
320 ifct>1thenprint" days":goto340
330 print" day"
340 rem
350 pokeqa+2,peek(qa):pokeqa+3,peek(qa+1):z9=fre(0)
360 dimpp(np),pg(np),dc(np),ni(50),im(50)
370 fori=1tonp:pg(i)=vi:next
380 fori=1toni:pg(i)=co:next
390 fori=1tonp:dc(i)=0:next
400 fori=1toni:dc(i)=ct:next
410 fori=1tonp
420 pp(i)=int(690*rnd(1)+1157):ifpeek(pp(i))<>igthen420
430 pokepp(i),pg(i):next
440 nd=0
450 im=0:print""tab(7)np-ni-im;tab(20)ni;tab(30)im
460 print" day";nd:nd$=str$(nd):say"day":saynd$
470 nd=nd+1:ni=0:im=0
480 fori=1tonp
490 rem
500 if(peek(pp(i))=co)and(pg(i)=vi)thendc(i)=ct
510 pg(i)=peek(pp(i))
520 onint(9*rnd(1)+1)gosub900,910,920,930,940,950,960,970,980
540 ifpg(i)=cothengosub1060
560 ifpg(i)=vithengosub1160
580 ifpg(i)=cothendc(i)=dc(i)-1
600 ifdc(i)<0thenpg(i)=gi:pokepp(i),gi
610 ifpeek(pp(i))=cothenni=ni+1
620 ifpeek(pp(i))=githenim=im+1
630 next
640 ifnd<=50thenni(nd)=ni:im(nd)=im
650 print""tab(7)np-ni-im"[157] ";tab(20)ni"[157] ";tab(30)im"[157] "
660 ifni>0then460
670 print" ";t$;:gosub1250
680 printchr$(147)"[144] day"tab(5)"infection":print:say"heers the bar charts."
690 fornd=1to50
700 forwt=1to150:next
710 print" ";nd;tab(4);
720 print" ";np-ni(nd)-im(nd);"";ni(nd);"";im(nd):print
730 ifnp-ni(nd)-im(nd)=0then750
740 fori=1tonp-ni(nd)-im(nd):print"[215]";:next
750 ifni(nd)=0then770
760 fori=1toni(nd):print"[209]";:next
770 ifim(nd)=0then790
780 fori=1toim(nd):print"*";:next
790 print"[144]":forx=1to1000:next
800 ifni(nd)=0then820
810 print:nextnd
820 print" like to see the chart again (y/n)?";"[145]";
823 say"like to see the chart again"
825 gosub1720:q$=z1$
830 ifq$=""thenprint"[145][145]";:gosub820
840 ifleft$(q$,1)="y"thenpoke29,0:goto680
845 poke29,0
850 goto1900
900 mv=39:gosub1000:return
910 mv=40:gosub1000:return
920 mv=41:gosub1000:return
930 mv=-1:gosub1000:return
940 mv=0:gosub1000:return
950 mv=1:gosub1000:return
960 mv=-41:gosub1000:return
970 mv=-40:gosub1000:return
980 mv=-39:gosub1000:return
990 rem
1000 ifpeek(pp(i)+mv)<>igthenreturn
1010 pg(i)=peek(pp(i))
1020 pokepp(i),ig
1030 pp(i)=pp(i)+mv
1040 pokepp(i),pg(i):return
1050 rem
1060 ifpeek(pp(i)-41)=vithenpokepp(i)-41,co
1070 ifpeek(pp(i)-40)=vi then pokepp(i)-40,co
1080 ifpeek(pp(i)-39)=vi then pokepp(i)-39,co
1090 ifpeek(pp(i)- 1)=vi then pokepp(i)- 1,co
1100 ifpeek(pp(i)+ 1)=vi then pokepp(i)+ 1,co
1110 ifpeek(pp(i)+39)=vi then pokepp(i)+39,co
1120 ifpeek(pp(i)+40)=vithen pokepp(i)+40,co
1130 ifpeek(pp(i)+41)=vithen pokepp(i)+41,co
1140 return
1150 rem
1160 ifpeek(pp(i)-41)=cothenpokepp(i),co
1170 ifpeek(pp(i)-40)=cothen pokepp(i),co
1180 ifpeek(pp(i)-39)=cothenpokepp(i),co
1190 ifpeek(pp(i)- 1)=cothenpokepp(i),co
1200 ifpeek(pp(i)+ 1)=cothenpokepp(i),co
1210 ifpeek(pp(i)+39)=cothenpokepp(i),co
1220 ifpeek(pp(i)+40)=cothenpokepp(i),co
1230 ifpeek(pp(i)+41)=cothenpokepp(i),co
1240 return
1250 print" press any key to continue [146]":say"press any key to cuntinue."
1260 getq$:ifq$=""then1260
1270 return
1360 print"[155][147]":fori=1024to1063:pokei,224:pokei+960,224:next
1365 fori=55296to55335:pokei,3:pokei+960,3:next
1370 fori=1064to1944step40:pokei,224:pokei+39,224:next
1375 fori=55336to56216step40:pokei,3:pokei+39,3:next
1380 print""
1385 printtab(8)"[167][163][205] "
1386 printtab(8)"[170] [206] "
1387 printtab(8)"[170] [205] [221] [207][208] [208][207] [207][208] [205][206] [221] [167][205] [165]"
1388 printtab(8)"[170][164][206] [221] [204][186] [167][165] [204][186] [206][205] [221] [167] [205][165]"
1390 rem
1400 print"[158]"
1410 print""tab(15)" epidemic [146]"
1420 rem
1430 printleft$(t$,20)tab(4);"do you need instructions (y/n)?";:poke29,0
1431 say"do you need instructions?":gosub1720:q$=z1$
1440 ifq$=""then1430
1450 ifleft$(q$,1)<>"y"thenpoke29,0:goto180
1460 poke29,0
1470 printchr$(147)" an epidemic has broken out on a small "
1480 print" island. the disease is not fatal, and"
1490 print" once contracted provides immunity for life."
1491 say"an epidemic has broken out on a small i land."
1492 say"the disease is not faital and oncecontracted pro vi dsimunity for life."
1500 print:print" you are allowed to choose certain "
1510 print" initial conditions:":print:print
1512 say"you are aloued to choose certen initial conditions."
1513 printtab(5);"the island population"
1515 say"the i land population."
1520 print:printtab(5)"the number originally infected"
1525 say"the number originally infected."
1530 print:printtab(5)"the number of days for which the"
1540 printtab(5)"disease is contagious - this is"
1550 printtab(5)"also the duration of the disease."
1553 say"the number of days for which the disease is contaigous."
1555 say"this is also the duration of the disease."
1560 print:print:print" the islanders will move about randomly,"
1570 print"[145] infecting others if contagious.";
1575 say"the i landers will move about randomly.infecting others if contaigous."
1580 print" those who are immune will not be infected. "
1585 say"those who are immune will not be infected. "
1590 print: gosub1250
1600 printchr$(147)"[158] this will continue until the disease has run it's";
1610 print" course (until there are no more infected persons)."
1613 say"this will continue until the disease has run it's course."
1615 say"until there are no more infected persons."
1620 print:print" you will then be given a day-by-day bar chart of the";
1630 print" history of the"
1640 print" epidemic, up to a maximum of 50 days."
1642 say"you will then be given a day by day bar chart"
1643 say"of the history of the epidemic."
1645 say"up to a maximum of fifty days."
1650 print:gosub1250
1660 goto180
1670 data1158,1167,1196,1211
1680 data1234,1222,1271,1296,1306,1339,1346,1379,1386,1418
1690 data1427,1459,1469,1500,1510,1541,1553,1581
1700 data1593,1618,1632,1654,1673,1693,1715,1731,1757,1771
1710 data1800,1812,1841,1848
1720 z$="":z1$=""
1730 print"[166][157]";:fori=1to50
1735 getz$:ifz$<>""then1760
1740 next:print" [157]";:fori=1to50
1750 getz$:ifz$<>""then1760
1755 next:goto1730
1760 ifz$<>chr$(20)then1810
1770 ifz$=""then1730
1780 zz=len(z1$):ifzz<1then1730
1790 z1$=left$(z1$,zz-1):poke29,0:print"[157]";
1800 goto1730
1810 ifz$=chr$(13)orz$=chr$(141)then1850
1820 printz$;
1830 z1$=z1$+z$
1840 goto1730
1850 fori=1to10:getz$:nexti
1860 print
1870 return
1900 poke720,8:poke739,49:poke744,57:poke749,48:poke754,48:poke759,13
1902 poke743,169:poke758,169:poke792,207:poke793,2
1905 poke53281,6:poke53280,6:print"[147] want another try? (y/n)":
1907 say"do you want another try professor?"
1910 getx$:ifx$=""then1910
1920 ifx$="n"then1940
1930 run
1940 x$="":print"[147] do you want to return to war games ?":poke29,0
1945 say"do you want to return to war games?"
1950 getx$:ifx$=""then1950
1960 ifx$="y"then1980
1970 print"[147] bye,bye":say"bye bye.":end
1980 print"[147]load";chr$(34);"war menu";chr$(34);",8,1"
1990 poke631,19:poke632,13:poke633,82:poke634,117:poke635,13:poke198,5:end
2000 poke720,8:poke739,49:poke744,57:poke749,48:poke754,48:poke759,13
2002 poke743,169:poke758,169:poke792,207:poke793,2:poke53281,6:poke53280,6
2005 ifpeek(49153)=187then2020
2010 print"[147] loading sub programs [146]":load"sam",8,1
2020 poke52,125:poke54,125:poke56,125:sys38144
2030 goto110